package spring.Test;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import spring.AppConfig;
import spring.beanTest.User;

/**
 * Project: tobe-better-coder
 * Package: BenaTest
 *
 * @author : Mr.xu
 * @date : 2023/5/10 8:29
 */
@EnableAspectJAutoProxy
@Configuration
public class TestSpring {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext configApplicationContext = new AnnotationConfigApplicationContext(AppConfig.class);
        User user = (User) configApplicationContext.getBean("user");
        user.test();
//        System.out.println(configApplicationContext.getBean("user"));
        System.out.println(1);
    }
}